package cn.tedu.store.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.tedu.store.bean.Area;
import cn.tedu.store.bean.City;
import cn.tedu.store.bean.Province;
import cn.tedu.store.mapper.DistrictMapper;

@Service("districtService")
public class DistrictServiceImpl implements IDistrictService{
	@Resource(name="districtMapper")
	private DistrictMapper districtMapper;

	public List<Province> getProvinces() {
		
		return districtMapper.getProvinces();
	}

	public List<City> getCities(String parent) {
		
		return districtMapper.getCities(parent);
	}

	public List<Area> getAreaes(String parent) {
		
		return districtMapper.getAreaes(parent);
	}

	public String getProvinceNameByCode(String code) {
		
		return districtMapper.getProvinceNameByCode(code);
	}

	public String getCityNameByCode(String code) {
		
		return districtMapper.getCityNameByCode(code);
	}

	public String getAreaNameByCode(String code) {
		
		return districtMapper.getAreaNameByCode(code);
	}
	
}
